package main

import (
	"fhe-search-cloud/g"
	"fhe-search-cloud/httpd"
	"fhe-search-cloud/utils/log"
	"runtime"

	"gitee.com/fhe-search/fhe-search-rpc/encrpcclient"
)

func main() {
	os := runtime.GOOS
	switch os {
	case "windows":
		g.ReadConfig("cfg_win.toml")
	case "linux":
		g.ReadConfig("cfg_linux.toml")
	default:
		panic("本程序只支持 Windows 和 Linux")
	}

	encrpcclient.NewClient("localhost:9091")
	defer encrpcclient.CloseClient()

	log.InitLog(nil)
	defer log.CloseLog()

	httpd.Start()
}
